#include "hplcqinfineautosamplersendpacket.h"
#include "hplcqinfineautosamplerprotocoldata.h"
#include "common/hplcqinfinepfcid.h"
#include "common/hplcqinfinemakepacket.h"

namespace hplc
{
namespace qinfine
{

HplcQinfineAutoSamplerSendPacket::HplcQinfineAutoSamplerSendPacket(HplcQinfineAutoSamplerProtocolData &data, QObject *parent)
    : HplcQinfineSendCommonPacket (data, parent)
{

}

HplcQinfineAutoSamplerSendPacket::~HplcQinfineAutoSamplerSendPacket()
{

}

void HplcQinfineAutoSamplerSendPacket::setChannel(uint8_t channel)
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_AUTOSAMPLER_CHANNEL), channel);
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::getChannel()
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_AUTOSAMPLER_CHANNEL));
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::setBottleNumber(uint16_t number)
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_AUTOSAMPLER_BOTTLE_NUMBER), number);
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::getBottleNumber()
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_AUTOSAMPLER_BOTTLE_NUMBER));
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::setStartStop(uint8_t isStart)
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_AUTOSAMPLER_START_STOP), isStart);
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::getStartStop()
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_AUTOSAMPLER_START_STOP));
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::setNumberPattern(uint8_t pattern)
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_AUTOSAMPLER_NUMBER_PATTERN), pattern);
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::getNumberPattern()
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_AUTOSAMPLER_NUMBER_PATTERN));
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::setPrevStart()
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_AUTOSAMPLER_PREV_START));
    m_d->m_checker->sendRetry();
}

void HplcQinfineAutoSamplerSendPacket::setNextStart()
{
    HplcQinfineAutoSamplerProtocolData *m_d = static_cast<HplcQinfineAutoSamplerProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_AUTOSAMPLER_NEXT_START));
    m_d->m_checker->sendRetry();
}

} // qinfine
} // hplc
